home *** CD-ROM | disk | FTP | other *** search
- package com.extensibility.xa;
-
- import com.extensibility.rock.RAction;
- import com.extensibility.xml.BaseDeclaration;
- import com.extensibility.xml.NamespaceDeclaration;
- import java.awt.BorderLayout;
- import java.awt.Component;
- import java.awt.Container;
- import java.awt.Window;
- import javax.swing.JFrame;
- import javax.swing.JMenuBar;
- import javax.swing.JScrollPane;
- import javax.swing.JToolBar;
- import javax.swing.border.Border;
- import javax.swing.event.ListSelectionEvent;
- import javax.swing.event.ListSelectionListener;
-
- public class NamespaceWindow extends SchemaWin implements ListSelectionListener {
- NamespaceTable table;
- JScrollPane tblPane;
-
- public NamespaceWindow(SchemaDoc var1) {
- super(var1);
- ((Component)this).setVisible(false);
- ((JFrame)this).getContentPane().setLayout(new BorderLayout());
- ((Component)this).setVisible(false);
- this.table = new NamespaceTable(new NamespaceModel(((SchemaWin)this).getSchemaDoc()));
- this.tblPane = new JScrollPane(this.table);
- this.tblPane.setBorder((Border)null);
- this.tblPane.setHorizontalScrollBarPolicy(31);
- this.tblPane.setVerticalScrollBarPolicy(22);
- this.tblPane.setCorner("UPPER_RIGHT_CORNER", this.table.createCorner());
- ((JFrame)this).getContentPane().add(this.tblPane, "Center");
- JToolBar var2 = ((SchemaWin)this).createToolBar();
- if (var2 != null) {
- ((JFrame)this).getContentPane().add(var2, "North");
- }
-
- ((JFrame)this).setJMenuBar(this.createMenuBar());
- ((Window)this).addWindowListener(new 1(this));
- }
-
- public DeclTable getCurrentTable() {
- return this.table;
- }
-
- public String getClassName() {
- return "com.extensibility.xa.NamespaceWindow";
- }
-
- public void dispose() {
- super.dispose();
- ((Container)this).removeAll();
- }
-
- public boolean select(BaseDeclaration var1) {
- return this.table.select(var1);
- }
-
- public boolean commitPendingEdits(boolean var1) {
- return this.table.commitPendingEdits(var1);
- }
-
- protected RAction createCutAction() {
- return this.table.cutAction;
- }
-
- protected RAction createCopyAction() {
- return this.table.copyAction;
- }
-
- protected RAction createPasteAction() {
- return this.table.pasteAction;
- }
-
- protected RAction createClearAction() {
- return this.table.clearAction;
- }
-
- protected RAction createExpandAction() {
- return this.table.expandAction;
- }
-
- protected JMenuBar createMenuBar() {
- JMenuBar var1 = super.createMenuBar();
- return var1;
- }
-
- public void valueChanged(ListSelectionEvent var1) {
- NamespaceDeclaration var2 = (NamespaceDeclaration)this.table.getSelectedDecl();
- ((SchemaWin)this).declarationFocused(var2);
- }
-
- public void selectDeclaration(BaseDeclaration var1) {
- this.table.select(var1);
- }
- }
-